<?php
namespace application\admin\controller;
use application\admin\model\AuthGroup;
use application\admin\model\AuthRule;

class Group extends Base
{

    // 角色列表
    public function lists()
    {
        $mGroup = new AuthGroup();
        $list = $mGroup->getList();
        
        $this->assign('list', $list);
        return $this->fetch();
    }

    // 添加角色
    public function add()
    {
        if( $this->request->isPost() )
        {
            
        }else{
            return $this->fetch();
        }
    }

    // 修改角色
    public function edit()
    {
        if( $this->request->isPost() )
        {

        }else{
            return $this->fetch();
        }
    }

    // 配置权限
    public function access()
    {
        if( $this->request->isPost() )
        {

        }else{
            $id = $this->request->get('id', 0, 'intval');
            
            if( $id )
            {
                $mRule = new AuthRule();
                return $this->fetch();
            }
            return $this->fetch();
        }
    }

}